package com.hisense.ovcloud.mqtt.business.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@ConfigurationProperties(prefix = "mqtt.client")
@Configuration
@Data
public class MqttClientConfig {
    private String brokerHost = "emqx";
    private int plainTextPort = 1883;
    private int sslPort = 8883;
    private int maxMsgSize = 100_000_000;
    private long reconnectInterval = 500L;
    private int keepAliveInterval = 2;
    private int reconnectAttempts = Integer.MAX_VALUE;
    private boolean cleanSession;
    private int connectTimeout = 5;

    private String uploadKafkaTopic = "mqtt_upload";
    private String ctlKafkaTopic = "mqtt_cmdctl";
    private int uploadKafkaTopicExecPoolSize = 10;
    private int uploadKafkaTopicExecQueueSize = 10000;

    private int mqttClientCheckIntervalMillSeconds = 1000;
    private int cmdRetryTimes = Integer.MAX_VALUE;
    private int cmdRetryInterval = 500;
}
